<template>
  <div class="fiery">
    <span class="sign_title"> 2022年报名火热进行中 </span>
    <div class="cont_title">
      <span>专业名称</span>
      <span>剩余名额</span>
      <span>平均薪资</span>
      <span>限时报名</span>
    </div>
    <div class="scroll" ref="scroll-dom">
      <ul class="scroll-list" v-for="i in 3" :key="i">
        <li v-for="it in hotbms" :key="it.id">
          <span> {{ it.text }} </span>
          <span> {{ it.rs }} </span>
          <span> {{ it.money }} </span>
          <span class="xian">
            <a
              href="https://p.qiao.baidu.com/cps/chat?siteId=17865090&userId=39789408&siteToken=1592882751da134d1450a7e08b16ffcb"
            >
              在线咨询
            </a>
          </span>
        </li>
      </ul>
    </div>
    <span class="sign_title" style="font-size: 0.5rem;">  “校企定向班级” 限额100人 现 <font>仅剩16人</font> </span>
    <div class="form">
        <form action class="form1">
            <input type="text" placeholder="请输入你的名字" class="form-ipt">
            <input type="text" placeholder="请输入你的电话号码" class="form-ipt">
            <button type="button">马上抢占名额</button>
        </form>
    </div>
  </div>
</template>
<script setup>
import { getCurrentInstance , onMounted} from "vue";
onMounted(function(){
    const { refs } = getCurrentInstance();
    const ScrollTom = refs["scroll-dom"];
    var scrollTop = 0;
    const ScrollTopFun = function(){
        if(scrollTop >= ScrollTom.offsetHeight * 2){
            scrollTop = 0;
        } else {
            scrollTop += 1;
        }
        ScrollTom.scrollTop = scrollTop;
        setTimeout(ScrollTopFun , 20);
    }
    ScrollTopFun();
})
const hotbms = [
  { text: "空乘专业", rs: "26人", money: "15000元", id: 1 },
  { text: "游轮海乘", rs: "18人", money: "12000元", id: 2 },
  { text: "高铁乘务", rs: "23人", money: "10000元", id: 3 },
  { text: "地勤乘务", rs: "16人", money: "10000元", id: 4 },
];
</script>
<style scoped>
.fiery {
  width: 100%;
  height: auto;
  background-color: #58b2fe;
  margin-bottom: 0.15rem;
  padding-bottom: 0.4rem;
}
.sign_title {
  display: block;
  width: 100%;
  height: 1.6rem;
  font-size: 0.7rem;
  text-align: center;
  color: #fff;
  font-weight: 400;
  line-height: 1.6rem;
}
.cont_title {
  width: 94%;
  height: 1.4rem;
  margin: 0 auto;
  display: flex;
  background: #eee;
}
.cont_title span {
  display: block;
  width: 25%;
  height: 100%;
  font-size: 0.4rem;
  line-height: 1.4rem;
  text-align: center;
  color: #000;
}
.scroll {
  width: 94%;
  height: 6.4rem;
  margin: 0 auto;
  background: #fff;
  overflow: hidden;
}
.scroll-list {
  width: 100%;
  height: 100%;
}
.scroll-list li {
  width: 100%;
  height: 1.6rem;
  border-bottom: 0.005rem solid rgba(204, 187, 204, 0.7333333333);
  display: flex;
  align-items: center;
  line-height: 1.6rem;
  justify-content: space-around;
}
.scroll-list li span {
  display: block;
  padding: 0 0.2rem;
  font-size: 0.5rem;
  color: #666;
}
.xian {
  width: 2.4rem;
  height: 1rem;
  line-height: 0.25rem;
  text-align: center;
  border: 0.01rem solid #ff900f;
  font-size: 0.4rem !important;
  border-radius: 0.1rem;
  line-height: 1rem;
}
.xian a {
  color: #ff900f;
}
</style>